package jehc.cloud.gen.service.impl;

import jehc.cloud.common.base.BaseService;
import jehc.cloud.common.util.ExceptionUtil;
import jehc.cloud.gen.dao.XtGeneratorForbidtableDao;
import jehc.cloud.gen.model.XtGeneratorForbidtable;
import jehc.cloud.gen.dao.XtGeneratorForbidtableDao;
import jehc.cloud.gen.model.XtGeneratorForbidtable;
import jehc.cloud.gen.service.XtGeneratorForbidtableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Desc 禁止使用代码生成器生成模块
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Service("xtGeneratorForbidtableService")
public class XtGeneratorForbidtableServiceImpl extends BaseService implements XtGeneratorForbidtableService {
	@Autowired
	private XtGeneratorForbidtableDao xtGeneratorForbidtableDao;
	/**
	* 分页
	* @param condition 
	* @return
	*/
	public List<XtGeneratorForbidtable> getXtGeneratorForbidtableListByCondition(Map<String,Object> condition){
		try{
			return xtGeneratorForbidtableDao.getXtGeneratorForbidtableListByCondition(condition);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
	}
	/**
	* 查询对象
	* @param xt_generator_forbidtable_id 
	* @return
	*/
	public XtGeneratorForbidtable getXtGeneratorForbidtableById(String xt_generator_forbidtable_id){
		try{
			return xtGeneratorForbidtableDao.getXtGeneratorForbidtableById(xt_generator_forbidtable_id);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
	}
	/**
	* 添加
	* @param xtGeneratorForbidtable
	* @return
	*/
	public int addXtGeneratorForbidtable(XtGeneratorForbidtable xtGeneratorForbidtable){
		int i = 0;
		try {
			i = xtGeneratorForbidtableDao.addXtGeneratorForbidtable(xtGeneratorForbidtable);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 修改
	* @param xtGeneratorForbidtable
	* @return
	*/
	public int updateXtGeneratorForbidtable(XtGeneratorForbidtable xtGeneratorForbidtable){
		int i = 0;
		try {
			i = xtGeneratorForbidtableDao.updateXtGeneratorForbidtable(xtGeneratorForbidtable);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 删除
	* @param condition 
	* @return
	*/
	public int delXtGeneratorForbidtable(Map<String,Object> condition){
		int i = 0;
		try {
			i = xtGeneratorForbidtableDao.delXtGeneratorForbidtable(condition);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 批量添加
	* @param xtGeneratorForbidtableList
	* @return
	*/
	public int addBatchXtGeneratorForbidtable(List<XtGeneratorForbidtable> xtGeneratorForbidtableList){
		int i = 0;
		try {
			i = xtGeneratorForbidtableDao.addBatchXtGeneratorForbidtable(xtGeneratorForbidtableList);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 批量修改
	* @param xtGeneratorForbidtableList
	* @return
	*/
	public int updateBatchXtGeneratorForbidtable(List<XtGeneratorForbidtable> xtGeneratorForbidtableList){
		int i = 0;
		try {
			i = xtGeneratorForbidtableDao.updateBatchXtGeneratorForbidtable(xtGeneratorForbidtableList);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
}
